Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not mutate read-only files #1155

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

iloveitaly
Copy link
Contributor

Right now, if you attempt to build a project that contains read-only files it will fail with a simple permission error. This makes it impossible for the user
to understand what file is causing issues.

The simple fix used here simply does not mutate the line endings on files which cannot be written.

I'm not sure why the line endings are mutated on files or why the entire project directory is copied. I imagine I'm missing something obvious that could cause other downstream impacts,
so I'm opening this PR as the start of a discussion.

This PR:

fixes #1071
related #700

TODO

  • Tests are added/updated if needed

Copy link
Contributor

This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale The pull request is stale label Aug 16, 2024
@iloveitaly
Copy link
Contributor Author

Friendly reminder regarding this pull request. Please let me know if there are any further updates needed.

@github-actions github-actions bot removed the stale The pull request is stale label Aug 20, 2024
@coffee-cup coffee-cup added the release/patch Author patch release label Aug 27, 2024
@coffee-cup
Copy link
Contributor

Hey sorry about the delay. The line endings mutating was added here, #436 to fix issues with Windows.

This PR looks good though. Could you please just fix the lining/tests and we can get it merged :)

@iloveitaly
Copy link
Contributor Author

iloveitaly commented Sep 2, 2024

Can you help me with the windows build?

I'm a rust beginner and have no idea what the idiomatic way of handling this sort of thing in rust is.

@coffee-cup
Copy link
Contributor

Of course! You should be able to have a separate is_writable function that is used for windows. Similar to this

#[cfg(not(target_os = "windows"))]

Copy link
Contributor

This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale The pull request is stale label Sep 14, 2024
@iloveitaly
Copy link
Contributor Author

Friendly reminder that this pull request may be closed soon if there is no further activity. Let me know if you need any assistance.

@github-actions github-actions bot removed the stale The pull request is stale label Sep 15, 2024
@coffee-cup
Copy link
Contributor

I've updated the is_writable function to support windows. I'll merge after everything passes.

@coffee-cup coffee-cup merged commit cf46f86 into railwayapp:main Sep 17, 2024
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/patch Author patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Projects containing read-only files cannot be built
2 participants